home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / pascal / ptrp10.zip / TEST13.TRP < prev    next >
Text File  |  1994-05-17  |  642b  |  21 lines

  1. procedure main
  2. var
  3.         blank : string = "                                                 "
  4.         myStr : string
  5.         tFile : text = "test13.txt"
  6.         i     : byte;
  7.         l     : byte;
  8. endvar
  9.         write("Enter String ")
  10.         readln(myStr)
  11.         if (rewrite(tFile) = 0)
  12.                 l := length(myStr)
  13.                 for i := 1 to l
  14.                         writeln(tFile, copy(blank, 1, l - i + 1),
  15.                                        copy(myStr, l - i + 1, l),
  16.                                        copy(myStr, 1, i))
  17.                 endfor
  18.                 close(tFile)
  19.         endif
  20. endproc
  21.